# -*- coding:utf-8  -*-
# @Author: ChenYangMing
# @Time: 2024-09-25

import pathlib

from Common.config_utils import Config


class TaskConfig(Config):
    """
    任务配置类，用于存储特定任务的配置参数。
    可以添加任务特定的配置项，也可以覆盖继承自 Config 的配置项。
    """
    CAPABILITY = pathlib.Path(__file__).parent.parent.name
    TASK = pathlib.Path(__file__).parent.name
    DATA_PATH = f"{Config.BASE_DATA_PATH}/预测/城市网络流量长时预测/data.csv"
    HOLIDAYS_DATA_PATH = f"{Config.BASE_DATA_PATH}/预测/城市网络流量长时预测/holiday_dates.csv"
    LABEL_PATH = f'{Config.BASE_DATA_PATH}/预测/城市网络流量长时预测/truth.csv'
    HISTORY_LENGTH = 24 * 200  # 历史数据
    PREDICTION_LENGTH = 24 * 110  # 预测数据
    BATCH_SIZE = 16
    DEVICE = "cuda:0"
    MODEL_NAMES = [
        'TransformerModel',
        'InformerModel',
        'PatchTSTModel',
        'MTCNModel',
        'TCNModel',
        'LSTMModel',
        'CrossformerModel'
    ]
    # 定义使用的算法类名
    TASK_MODEL = 'TransformerModel'
    # 其他配置参数
    LR = 0.001
    EPOCHS = 10
    NUM_HEADS = 2
    HIDDEN_DIM = 32
    NUM_LAYERS = 1
    DROPOUT_RATE = 0.2

    MODEL_PATH_TO = {'A': f'{Config.MODEL_PATH}/{CAPABILITY}_{TASK}_{TASK_MODEL}_A.pth',
                     'B': f'{Config.MODEL_PATH}/{CAPABILITY}_{TASK}_{TASK_MODEL}_B.pth',
                     'C': f'{Config.MODEL_PATH}/{CAPABILITY}_{TASK}_{TASK_MODEL}_C.pth'}
    LOAD_MODEL_FROM = {'A': f'{Config.MODEL_PATH}/{CAPABILITY}_{TASK}_{TASK_MODEL}_A.pth',
                       'B': f'{Config.MODEL_PATH}/{CAPABILITY}_{TASK}_{TASK_MODEL}_B.pth',
                       'C': f'{Config.MODEL_PATH}/{CAPABILITY}_{TASK}_{TASK_MODEL}_C.pth'}
